<?php
include ("include.php");
$tintuc = new class_tintuc();

$download_path = ROOT_FS."/uploads/tintuc/";
if (isset($HTTP_GET_VARS['action'])) {
	if($HTTP_GET_VARS['action'] == "download" && $HTTP_GET_VARS['filename'] != ""){
		header('Content-type: application/x-octet-stream');
		header('Content-disposition: attachment; filename=' . urldecode($HTTP_GET_VARS['filename']));
		readfile($download_path . urldecode($HTTP_GET_VARS['filename']));
		exit;
	}
}




//Layout
$layout_file = $arr_layout["news"];
include("html_layout.php");


$sql = "select * from tintuc where langid='$langid' and tintuc_cat='$id' order by orders ASC, ngaythang DESC";
$str_content = $tintuc->list_item($sql, 2, TINTUC_IMAGES_SMALL_WIDTH, $which_page, "tmp_list_tintuc_content.htm");
$str_htm = ereg_replace("@noidung@", "$str_content", $str_htm);

//Header Loading - CSS, Meta, Javascript ...
include("html_header.php");

//Body Loading - Date-Time, ...
include("html_body.php");	

$menu_left_id = $arr_tintuc_id[$langid]["news"];
//Menu include
include("html_menu.php");

//Modules include
include("modules.php");

print $str_htm;
?>